package com.zhongge.sort;

import java.util.Arrays;

/**
 * @ClassName Test
 * @Description TODO
 * @Author 笨忠
 * @Date 2025/7/31 21:30
 * @Version 1.0
 */
public class Test {
    public static void insertSortTest() {
        int[] arr = {10, 9, 8, 7, 6, 5, 4, 3, 2, 1};
        System.out.println("==========直接插入排序=============");
        System.out.println("排序前：" + Arrays.toString(arr));
        SortUtil.insertSort(arr);
        System.out.println("排序后：" + Arrays.toString(arr));
    }
    public static void shellSortTest() {
        int[] arr = {10, 9, 8, 7, 6, 5, 4, 3, 2, 1};
        System.out.println("============希尔排序==============");
        System.out.println("排序前：" + Arrays.toString(arr));
        SortUtil.shellInsert(arr);
        System.out.println("排序后：" + Arrays.toString(arr));
    }
    public static void main(String[] args) {
      insertSortTest();
      shellSortTest();
    }
}
